import request from '@/utils/request'



//公告信息列表
export function announcementList(params) {
    return request({
        url: `/announcement/v1/list`,
        method: 'get',
        params
    })
}
//新增公告信息列表
export function addAnnouncement(data) {
    return request({
      url: '/announcement/v1',
      method: 'post',
      data
    })
}

//获取公告信息详情
export function getInfo(id) {
    return request({
        url: `/announcement/v1/getInfo/${id}`,
        method: 'get',
    })
}
//编辑公告信息列表
export function editAnnouncement(data) {
    return request({
        url: `/announcement/v1`,
        method: 'put',
        data
    })
}
//删除公告信息列表
export function removeAnnouncement(id) {
    return request({
      url: `/announcement/v1/${id}`,
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
        },
      method: 'DELETE',
    })
  }

//中台 显示-隐藏 公告信息
export function changeStatus(id) {
    return request({
        url: `/announcement/v1/changeStatus/${id}`,
        method: 'put',
    })
}

//公告推送app
export function announcementPush(id) {
    return request({
      url: `/announcement/v1/push/app/${id}`,
      method: 'post',
    })
}





